package com.copa.l461;

/**
 * @author copa
 * @createDate 2022-08-08 16:12
 * @function 内置函数
 */
public class Test1 {

    public int hammingDistance(int x, int y) {
        x ^= y;
        return Integer.bitCount(x);
    }

    public static void main(String[] args) {
        int x = 1;
        int y = 4;
        System.out.println(new Test1().hammingDistance(x, y));
    }
}
